from django.conf.urls import url
from . import views

urlpatterns=[
    url(r'^discussion/$', views.DiscussionAPIView.as_view()),  # 首页展示问题部分
    url(r'^discussion/label/$', views.ProblemLabelAPIView.as_view()),  # 标签首页展示部分

    url(r'^discussion/(?P<pk>\d+)/details/$', views.ProblemDataAPIView.as_view()),  # 详情页面内容部分
    url(r'^discussion/(?P<pk>\d+)/answer/$', views.AnswerDataAPIView.as_view()),
    url(r'^discussion/answer_son/$', views.SonDataAPIView.as_view()),

    # 问题点赞关系
    url(r'^discussion/like/$', views.ProblemLikeAPIView.as_view()),
    # 跟新点赞量
    url(r'^discussion/updata/$', views.UpdataLikeAPIView.as_view()),

    url(r'^discussion/(?P<pk>\d+)/sidebar/$', views.SidebarAPIView.as_view()),

    url(r'^discussion/create/$', views.CreateProbelmAPIView.as_view()),

    # 个人中心用户所有问题
    url(r'^discussion/(?P<pk>\d+)/problem/$', views.GetUserProblemAPIView.as_view()),

    # 个人中心用户所有回答
    url(r'discussion/(?P<pk>\d+)/comment/', views.GetUserCommentAPIView.as_view()),
]